package com.xqboss.apps.mapper.guild;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xqboss.apps.domain.guild.GuildMember;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 公会成员Mapper
 *
 * @author wangcong
 * @date 2023-11-01
 */
public interface GuildMemberMapper extends BaseMapper<GuildMember> {
    @Select("SELECT * FROM guild_member WHERE user_id = #{userId} AND del_flag = 1 ORDER BY exit_time DESC LIMIT 1")
    GuildMember getLastExitGuildInfo(@Param("userId") Long userId);
}
